feat: emit legacy assessment hints as QTI catalog-info#6034
Merged
Conversation
Legacy assessment items carry progressively-revealed hints (AssessmentItem.hints) that the QTI generator dropped. Emit them into the generated QTI item as a dormant qti-catalog-info catalog of support="ext:kolibri-hint" cards - content the QTI 3.0 schema excludes from default delivery - so Kolibri can render them while default players ignore them. One qti-card per hint in display order, hint markdown converted to HTML via the existing render pipeline (so hint images are claimed by the existing file-dependency scan). Items with no usable hints emit no qti-catalog-info. Wired through both the webapp publish path (archive.py) and the ricecooker ingest path (ingest.py). Malformed hints are logged and skipped rather than aborting the channel publish. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rtibbles
approved these changes
Jul 9, 2026
rtibbles
left a comment
Member
There was a problem hiding this comment.
Changes are to spec, good test coverage of the changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Legacy assessment items carry progressively-revealed hints that the QTI generator dropped, so published QTI exercises lost them entirely. This emits each hint into the generated QTI item as a dormant
qti-catalog-infocatalog ofsupport="ext:kolibri-hint"cards — content the QTI 3.0 schema excludes from default delivery, so Kolibri can render it while stock players ignore it. Hint markdown reuses the existing render pipeline, so hint images are claimed by the existing file-dependency scan; items with no usable hints emit no catalog element.References
Closes #6011. Follows #6031 (shared legacy→QTI conversion) and #6032.
Reviewer guidance
contentcuration/contentcuration/utils/assessment/qti/convert.py—_create_catalog_infosorts hints by"order"and skips text-less hints inside atry/except; confirm a malformed hint (missing/incomparableorder, null text) cannot raise and abort the whole channel publish.contentcuration/contentcuration/utils/assessment/qti/assessment_item.py:238—catalog_infois declared betweenitem_bodyandresponse_processing, and field order is XML element order; confirm this placement keeps the item XSD-valid.contentcuration/contentcuration/utils/assessment/qti/ingest.py:32— hints are placeholder-stripped like answers before conversion; check the ricecooker path handles an absent"hints"key without error.AI usage
Used Claude Code to implement this against a pre-approved plan with test-driven development. Verified with the scoped QTI test suite, the DB-backed exercise-creation tests, flake8, and the pre-commit hook chain.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
🟡 Waiting for feedback
Last updated: 2026-07-09 21:46 UTC